﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using GalaSoft.MvvmLight;
using SqlSugar;
namespace WebFirst.Entities
{
    /// <summary>
    /// 
    ///</summary>
    [SugarTable("objectID")]
    public class ObjectID : INotifyPropertyChanged
    {
        /// <summary>
        ///  
        /// 默认值: 
        ///</summary>
        [SugarColumn(ColumnName = "id", IsPrimaryKey = true, IsIdentity = true)]
        public int? Id { get; set; }
        /// <summary>
        ///  
        /// 默认值: 
        ///</summary>
        [SugarColumn(ColumnName = "objectID")]
        public string _ObjectID { get; set; }
        /// <summary>
        ///  
        /// 默认值: 
        ///</summary>
        [SugarColumn(ColumnName = "AttributeID")]
        public int? AttributeID { get; set; }
        /// <summary>
        ///  
        /// 默认值: 
        ///</summary>
        [SugarColumn(ColumnName = "objectDes")]
        public string ObjectDes { get; set; }
        /// <summary>
        ///  
        /// 默认值: 
        ///</summary>
        [SugarColumn(ColumnName = "classid")]
        public int? Classid { get; set; }
        /// <summary>
        ///  
        /// 默认值: 
        ///</summary>
        [SugarColumn(ColumnName = "ClientAPDU")]
        public int? ClientAPDU { get; set; }

        public event PropertyChangedEventHandler PropertyChanged;


        private bool? isSelect;
        [SugarColumn(IsIgnore = true)]
        public bool? IsSelect
        {
            get {
                if (isSelect == null)
                {
                    isSelect = false;
                }
                
                return isSelect; }
            set
            {
                
                isSelect = value; OnChanged(new PropertyChangedEventArgs("IsSelect"));

            }
        }
        protected void OnChanged(PropertyChangedEventArgs arg)//具体方法
        {
            
            PropertyChanged?.Invoke(this, arg);
        }

    }
}
